<template>
  <div class="header">
    <div class="icons">
      <!--<div class="return icon-undo2"></div>
      <div class="back icon-redo2"></div>-->
      <div class="sav icon-floppy-disk" @click="changeWarp"></div>
    </div>
    <div class="tile">小程序可视化编辑</div>
    <div class="btns">
      <!--<div class="pre">预览</div>-->
      <!--<div class="push" @click="downLoader">导出</div>-->
      <a href="http://192.168.31.157:8080/wxtest/public/index/index/downLoad" target="_blank" class="push" @click="downLoader">导出</a>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  import axios from 'axios'
  export default {
    name:"heder",
    beforeMount() {
      console.log(this.$root)
    },
    methods: {
      changeWarp () {
        this.$emit('changeWarp');
      },
      downLoader() {
        let down ="下载"
        axios.post('http://192.168.31.157:8080/tp5/public/index/index/getPage', {
          down: '下载文件'
        })
          .then(function (response) {
            console.log(response);
          })
          .catch(function (error) {
            console.log(error);
          });

        console.log(down);


      },
      }

  }
</script>

<style lang="less" rel="stylesheet/less">
  @import "../common/css/index.less";
  .header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #2e3e4e;
    color: #9db1c5;
    height: 50px;
    line-height:50px;
    text-align: center;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    >div {
      flex: 1;
    }
    .icons {
      display: flex;
      align-items: center;
      justify-content: center;
      div {
        padding:0 15px;
      }
    }
    .btns {
      display: flex;
      justify-content: center;
      div {
        padding:0 15px;
      }
      .push {
        cursor: default;
        display: block;
      }
    }
  }
</style>

